﻿using System;
using System.Collections.Generic;
using SellAndBuy.Application.Query.DTOs;

namespace SellAndBuy.Web.ViewModels
{
    /// <summary>
    /// View model of Ad Details
    /// </summary>
    public class AdDetailsViewModel
    {
        private readonly AdDTO _ad;

        /// <summary>
        /// Initializes a new instance of the view model
        /// </summary>
        public AdDetailsViewModel(AdDTO ad)
        {
            _ad = ad;
        }

        public int ID
        {
            get { return _ad.ID; }
        }

        public string Owner
        {
            get { return _ad.Owner; }
        }

        public string Title
        {
            get { return _ad.Title; }
        }

        public string Description
        {
            get { return _ad.Description; }
        }

        public DateTime CreationDate
        {
            get { return _ad.CreationDate; }
        }

        public decimal Price
        {
            get { return _ad.Price; }
        }

        public IEnumerable<PictureInfoDTO> Pictures
        {
            get { return _ad.Pictures; }
        }

    }
}